<template>
  <div id="home"></div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import G6 from "@antv/g6";

@Component({
  components: {},
})
export default class HomeView extends Vue {
  created() {
    this.handleInitTopo();
  }

  handleInitTopo() {
    console.log("init");
    const graph = new G6.Graph({
      container: "home", // 创建的容器 id 或容器本身
      width: window.innerWidth - 120, // Number，图的宽度
      height: window.innerHeight - 120, // Number，图的高度
    });
  }
}
</script>

<style scoped>
#home {
  width: 100%;
  height: 100%;
}
</style>
